package com.wxb.lottery.service.impl;

import com.wxb.lottery.domain.LotterySign;
import com.wxb.lottery.mapper.LotteryMapper;
import com.wxb.lottery.service.LotteryService;
import com.wxb.lottery.util.RandomUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LotteryServiceImpl implements LotteryService {

    @Autowired
    private LotteryMapper lotteryMapper;
    @Override
    public LotterySign getSignInfoInfoById(Integer id) {
        LotterySign lotterySign =  lotteryMapper.getSignInfoInfoById(id);
        switch (lotterySign.getSignStatus()) {
            case "00":
               lotterySign.setSignStatus("上上签");
               break;
            case "01":
                lotterySign.setSignStatus("中上签");
                break;
            case "02":
                lotterySign.setSignStatus("中平签");
                break;
            case "03":
                lotterySign.setSignStatus("中上签");
                break;
            case "04":
                lotterySign.setSignStatus("下下签");
                break;
            default:
                break;
        }

        return lotterySign;
    }
}
